package example.simple_mindmap.api.client;

import cn.hutool.core.bean.BeanUtil;
import example.simple_mindmap.common.domain.dto.UserDTO;
import example.simple_mindmap.common.domain.po.Result;

import example.simple_mindmap.controller.UserController;
import example.simple_mindmap.service.UserServiceImpl;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @BelongsProject: 8.mindmap
 * @BelongsPackage: com.mm.api.client
 * @Author : 游在海里的鱼
 * @CreateTime : 2024-05-16  22:11
 * @Version : 1.0
 * @ClassName : TODO
 * @Description : TODO
 */
//@FeignClient("user-server")
//public interface UserClient {
//    @GetMapping("/user/info")
//    Result<UserDTO> userInfo(@RequestParam("id") Long id);
//}

@RequiredArgsConstructor
@Component
public class UserClient {
    final UserController userController;
    public Result<UserDTO> userInfo(Long id){
        return userController.userInfo(id);
    }
}
